package edu.bit.water.dao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import edu.bit.water.entity.LabelEvaCmpWaterTAndASum;

@Mapper
public interface LabelEvaCmpWaterAnlDao {

	String getWater1Sum(@Param("company_id") int company_id);
	String getUnconWaterUse(@Param("company_id") int conmpany_id);

	//增加
	int add(LabelEvaCmpWaterTAndASum labelEvaCmpWaterAnl);
	//查询
	List<LabelEvaCmpWaterTAndASum> select();
	int selectCompanyId(int id);
	//删除
	int delete(int id);
	//更新
	int update(LabelEvaCmpWaterTAndASum labelEvaCmpWaterAnl);
	//查询表中与总计有关的所有字段
	LabelEvaCmpWaterTAndASum selectSum(int id);
	//更新表中与总计有关的所有字段
	int updateSum(LabelEvaCmpWaterTAndASum labelEvaCmpWaterTAndASum);
	//插入表中与总计有关的所有字段
	int insertSum(LabelEvaCmpWaterTAndASum labelEvaCmpWaterTAndASum);
	//查询标签表中的中间变量
	LabelEvaCmpWaterTAndASum selectMiddleVariable(int id);
	//保存中间变量和结果
	int updateVariable(LabelEvaCmpWaterTAndASum labelEvaCmpWaterTAndASum);
	//查询总计值和计算值
	LabelEvaCmpWaterTAndASum selectSumResult(int id);
	//查询公式计算过程
	LabelEvaCmpWaterTAndASum selectResult(@Param("sum") String sum,@Param("rid")int rid);
	
	//更新公式1的中间变量和结果值
	int updateFormula1(@Param("id") int id, @Param("variablTwoAverage") double variablTwoAverage, @Param("result") double result, @Param("sum_data") String sum_data);
	//更新公式2的中间变量和结果值
	int updateFormula2(@Param("id") int id,@Param("variablOneAverage") double variablOneAverage,@Param("variablTwoAverage") double variablTwoAverage,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式3的中间变量和结果值
	int updateFormula3(@Param("id") int id,@Param("variablOneAverage") double variablOneAverage,@Param("variablTwoAverage") double variablTwoAverage,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式4的中间变量和结果值
	int updateFormula4(@Param("id") int id,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式5的中间变量和结果值
	int updateFormula5(@Param("id") int id,@Param("variablOneAverage") double variablOneAverage,@Param("variablTwoAverage") double variablTwoAverage,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式6的中间变量和结果值
	int updateFormula6(@Param("id") int id,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式7的中间变量和结果值
	int updateFormula7(@Param("id") int id,@Param("variablOneAverage") double variablOneAverage,@Param("variablTwoAverage") double variablTwoAverage,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式8的中间变量和结果值
	int updateFormula8(@Param("id") int id,@Param("variablTwoAverage") double variablTwoAverage,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式9的中间变量和结果值
	int updateFormula9(@Param("id") int id,@Param("variablOneAverage") double variablOneAverage,@Param("variablTwoAverage") double variablTwoAverage,@Param("retString") String retString, @Param("sum_data") String sum_data);
	//更新公式10的中间变量和结果值
	int updateFormula10(@Param("id") int id,@Param("retString") String retString, @Param("sum_data") String sum_data);	
}
